<%--
    Document   : index
    Created on : 28-set-2010, 14.57.49
    Author     : giosk
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>EverythingOnline Store</title>
        <link rel="stylesheet" type="text/css" href="css/style.css"/>
        <script type="text/javascript" src="scripts/main.js"></script>
        <base target="_self"/>
    </head>
    <body>
        <%@include file="WEB-INF/jspf/header.jspf"%>
        <!-- start page -->
        <div id="content">
            <div class="post" style="background: url(images/id.png) no-repeat top right">
                <h2 class="title">Registrazione</h2>

                <div class="entry">
                    <p>Inserisci i tuoi dati.</p>

                    <c:set var="login" value="" scope="page"/>
                    <c:set var="nome" value="" scope="page"/>
                    <c:set var="cognome" value="" scope="page"/>
                    <c:set var="email" value="" scope="page"/>
                    <c:set var="disabled" value="" scope="page"/>

                    <c:if test="${requestScope.bool}">
                        <c:set var="login" value="${requestScope.login2}" scope="page"/>
                        <c:set var="nome" value="${requestScope.first}" scope="page"/>
                        <c:set var="cognome" value="${requestScope.last}" scope="page"/>
                        <c:set var="email" value="${requestScope.email2}" scope="page"/>
                        <c:set var="disabled" value="readonly=readonly" scope="page"/>
                    </c:if>

                    <div id="form_openID">
                        <form action="consumer_redirect.jsp" method="POST">
                            <fieldset>
                                <legend>openID</legend>
                                <input type="text" name="openid" /><br />
                                <input type="hidden" name="flag_set" value="xreg"/>
                                <input type="submit" value="Ok"/>
                            </fieldset>
                        </form>
                    </div>

                    <form name="form_registrazione" action="IscrizioneServlet" method="post" onsubmit="return validate_registrazione(this);">
                        <input type="hidden" name="request_type" value="signup"/>
                        <table>
                            <tr>
                                <td><strong>Login:</strong></td>
                                <td><input name="login" type="text" value="${login2}" ${disabled} /></td>
                            </tr>
                            <tr>
                                <td><strong>Password:</strong></td>
                                <td><input name="pwd" type="password" /></td>
                            </tr>
                            <tr>
                                <td><strong>Ripeti password:</strong></td>
                                <td><input name="pwd2" type="password"/></td>
                            </tr>
                            <tr>
                                <td><strong>Nome:</strong></td>
                                <td><input name="nome" type="text" value="${first}" ${disabled} /></td>
                            </tr>
                            <tr>
                                <td><strong>Cognome:</strong></td>
                                <td><input name="cognome" type="text" value="${last}" ${disabled} /></td>
                            </tr>
                            <tr>
                                <td><strong>Email:</strong></td>
                                <td><input name="email" type="text" value="${email2}" ${disabled} /></td>
                            </tr>
                            <tr>
                                <td colspan="2"><input type="submit" value="Registrati"/></td>
                            </tr>
                        </table>
                    </form>
                </div>

            </div>
        </div>
        <%@include file="WEB-INF/jspf/nav.jspf"%>
        <!-- end page -->

        <%@include file="WEB-INF/jspf/footer.jspf"%>
    </body>
</html>